package com.hw.event;

import lombok.Data;

/**
 * @ClassName: DeviceEvent
 * @Description:
 * @Author: vie0134
 * @Date: 2020-12-18 15:08
 * @Version: 1.0
 **/
@Data
public class DeviceEvent {
    private DeviceEventType type;
    private String uuid;

    public static DeviceEvent sendOpen(String uuid) {
        DeviceEvent deviceEvent = new DeviceEvent();
        deviceEvent.setType(DeviceEventType.OPEN);
        deviceEvent.setUuid(uuid);
        return deviceEvent;
    }

    public static DeviceEvent sendClose(String uuid) {
        DeviceEvent deviceEvent = new DeviceEvent();
        deviceEvent.setType(DeviceEventType.CLOSE);
        deviceEvent.setUuid(uuid);
        return deviceEvent;
    }
}
